$page-section-bg: #313131;
$page-section-radius: 6px;


// 白天模式卡片：#f0f1f5

.sales-panel__container {
  overflow: hidden;
  display: flex;
  width: 100%;
  height: 100%;
  gap: 10px;
  .panel__left {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 300px;
    background-color: var(--cyd-color-bg-section);
    border-radius: $page-section-radius;
    user-select: none;
    .title {
      display: flex;
      width: 100%;
      padding: 10px 10px;
      box-sizing: border-box;
      color: var(--cyd-color-text-primary);
      .tag-wrap {
        display: flex;
        flex: 1;
        justify-content: flex-end;
        .tag {
          display: inline-block;
          height: 22px;
          line-height: 22px;
          padding: 0 8px;
          margin-left: 6px;
          background-color: var(--cyd-color-bg-danger);
          font-size: 12px;
          font-weight: normal;
          border-radius: 4px;
        }
      }
    }
    .table__info {
      padding: 0 10px;
      font-size: 13px;
      // background-color: #eee;
    }
    .panel__content {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      flex: 1;
      width: 100%;
      margin: 10px 0;
      padding: 0 10px;
      border-top: 1px dashed var(--cyd-color-border-level-3);
      box-sizing: border-box;
      .product-title {
        display: flex;
        justify-content: space-between;
        font-size: 15px;
        padding: 10px 0;
        .total-size {
          font-size: 12px;
          color: #8c8c8c;
          font-weight: normal;
        }
      }
      .product-list {
        flex: 1;
        overflow: auto;
        width: 100%;
        // min-height: auto;
        padding: 10px;
        box-sizing: border-box;
        .product-item {
          position: relative;
          overflow: hidden;
          display: flex;
          margin: 8px 0;
          border-radius: 4px;
          background-color: var(--cyd-color-bg-level-2);
          border: 1px solid var(--c-color-border-level-4);
          .serial-number {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background-color: var(--cyd-color-bg-brand-1);
            border-radius: 0 0 6px 0;
          }
          .image-box {
            overflow: hidden;
            width: 120px;
            height: 90px;
            background-color: #191e2f;
            .image {
              display: block;
              width: 100%;
              height: 100%;
            }
          }
          .right {
            flex: 1;
            margin-left: 10px;
            .product-name {
              margin-top: 5px;
              font-size: 15px;
              color: var(--cyd-color-text-primary);
            }
            .unit-price {
              margin: 2px 0 3px -1px;
              font-size: 12px;
              color: #959595;
            }
          }
        }
      }
    }
    .panel__footer {
      display: flex;
      align-items: center;
      width: 100%;
      // border-top: 1px solid #000;
      padding: 15px 10px;
      box-sizing: border-box;
      // background-color: #181b23;
      background-color: var(--cyd-color-bg-brand);
      color: var(--cyd-color-text-contrast);
      .total-price {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 0 10px 0 0;
        font-size: 20px;
        font-weight: 600;
        .discount__price {
          text-decoration: line-through;
          margin-left: 10px;
          font-size: 12px;
        }
      }
      .pay-btn {
        width: 110px;
        height: 50px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 40px;  
        background-color: var(--cyd-color-brand-3);
        color: var(--cyd-color-text-contrast);
        cursor: pointer;
      }
    }
  }
  .panel__middle {
    padding: 0 20px;
    background-color: $page-section-bg;
    border-radius: $page-section-radius;
  }
  .panel__right {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    background-color: var(--cyd-color-bg-section);
    border-radius: $page-section-radius;
    .right__title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 10px;
    }
    .category {
      align-items: flex-start;
      display: flex;
      padding: 2px 10px;
      margin: 10px;
      border-radius: 8px;
      background-color: var(--cyd-color-bg-level-2);
      .category-list {
        display: flex;
        flex-wrap: wrap;
        flex: 1;
        gap: 10px;
        padding: 10px 0;
        box-sizing: border-box;
        .category-list__item {
          display: flex;
          align-items: center;
          padding: 0 26px;
          height: 38px;
          background-color: var(--cyd-color-bg-level-2);
          font-size: 15px;
          font-weight: 600;
          color: #797979;
          user-select: none;
          box-sizing: border-box;
          border-radius: 6px;
          transition: background-color .3s;
          cursor: pointer;
          // background-color: #ccc;
          &.is-active {
            color: var(--cyd-color-text-contrast);
            background-color: var(--cyd-color-primary);
          }
          &:hover {
            background-color: var(--cyd-color-bg-level-1);
          }
        }
      }

      .search-box {
        position: relative;
        overflow: hidden;
        width: 260px;
        height: 36px;
        margin: 10px 0;
        margin-right: 10px;
        border-radius: 40px;
        background-color: var(--cyd-color-bg-level-2);
        border: 1px solid var(--cyd-color-border-level-4);
        input {
          display: block;
          height: 100%;
          background-color: inherit;
          border: none;
          padding: 0 20px;
          font-size: 15px;
          box-sizing: border-box;
          color: var(--cyd-color-text-primary);
          outline: none;
        }
        .search-icon {
          position: absolute;
          right: 10px;
          top: 50%;
          line-height: 1;
          transform: translateY(-50%);
          color: #bfbfbf;
        }
      }
    }

    .products {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      flex: 1;
      width: 100%;
      // margin: 10px 0;
      padding: 10px;
      box-sizing: border-box;
      .product-list {
        overflow: hidden auto;
        flex: 1;
        border-radius: 4px;
        .product-list__inner {
          display: flex;
          flex: 1;
          justify-content: flex-start;
          width: calc(100% + 6px);
          margin: -6px;
          flex-wrap: wrap;
        .product-list__item {
          overflow: hidden;
          display: flex;
          // width: 25%;
          flex: 0 0 calc(25% - 12px);
          margin: 6px;
          background-color: var(--cyd-color-bg-level-2);
          border-radius: 4px;
          box-sizing: border-box;
          transition: background-color .25s;
          cursor: pointer;
          &:hover {
            background-color: var(--cyd-color-bg-level-3);
          }
          .cart-qty-tag {
            position: absolute;
            left: 10px;
            bottom: 12px;
            width: 30px;
            height: 18px;
            line-height: 18px;
            border-radius: 10px;
            background-color: var(--cyd-color-bg-danger);
            text-align: center;
            font-size: 12px;;
            user-select: none;
          }
          .image-box {
            overflow: hidden;
            width: 95px;
            height: 110px;
            .image {
              width: 100%;
              height: 100%;
            }
          }
          .product-info {
            position: relative;
            flex: 1;
            padding: 4px 6px;
            color: var(--cyd-color-text-primary);
            .name {
              // padding: 0 10px;
              font-size: 14px;
              color: var(--cyd-color-text-level);
            }
            .price {
              margin: 8px 0;
              line-height: 1;
              font-size: 12px;
              // padding: 2px 10px;
              font-weight: normal;
              color: var(--cyd-color-text-level-4);
            }
            .inventory-qty {
              position: absolute;
              right: 10px;
              bottom: 10px;
              font-size: 12px;
              font-weight: normal;
              transform: scale(0.9);
              color: var(--cyd-color-text-level-5);
            }
            .product-qty__wrap {
              justify-content: flex-end;
            }
          }
        }
      }
      }
    }

    .product-list__pager {
      display: flex;
      align-items: center;
      padding: 10px 0 10px 0;
      user-select: none;
      .total-size {
        font-size: 14px;
        color: #7e7e7e;
      }
      .page-control__wrap {
        flex: 1;
        justify-content: flex-end;
        align-items: center;
        display: flex;
        color: #8f8f8f;
        .page-item {
          display: block;
          width: 20px;
          line-height: 1;
          cursor: pointer;
          transition: color .3s;
          &:hover {
            color: #c4c4c4;
          }
        }
        .page {
          width: 50px;
          line-height: 1;
          margin: 0 20px;
          text-align: center;
          font-size: 16px;
        }
      }
    }

    .append-product {
      display: none;
      margin-top: 4px;
      padding: 10px;
      border-radius: 10px;
      background-color: #24262d;
      .title {
        margin: 0 0 8px 0;
        font-size: 15px;
      }
      .append-product__wrap {
        display: flex;
        align-items: flex-end;
      }
      .product-list {
        display: flex;
        align-items: flex-end;
        flex: 1;
        gap: 10px;
        .product__item {
          overflow: hidden;
          width: 70px;
          .image {
            display: block;
            width: 70px;
            height: 80px;
            border-radius: 4px;
          }
          .name {
            font-size: 12px;
          }
        }
      }
      .confirm-button {
        display: flex;
        gap: 10px;
        .btn {
          height: 36px;
          padding: 0 20px;
          border: 1px solid #2c3446;
          background-color: #262830;
          color: #fff;
          border-radius: 4px;
          cursor: pointer;
          &.confirm {
            background-color: #2c3e8b;
          }
        }
      }
    }
  }
}



.product-qty__wrap {
  display: inline-flex;
  align-items: center;
  // width: 100%;
  width: 80px;
  padding: 2px 8px;
  border: 1px solid var(--cyd-color-border-level-4);
  box-sizing: border-box;
  user-select: none;
  border-radius: 6px;
  transition: border-color .25s;
  &:hover {
    border: 1px solid var(--cyd-color-border-level-3);
  }
  .qty {
    height: 23px;
    line-height: 23px;
    min-width: 30px;
    // margin: 0 10px;
    text-align: center;
    font-size: 13px;
    color: var(--cyd-color-text-primary);
  }
  .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    margin-top: -1px;
    line-height: 1;
    // border: 1px solid #2c4a8c;
    color: var(--cyd-color-text-level-5);
    border-radius: 50%;
    font-size: 26px;
    vertical-align: top;
    transition: color .2s;
    cursor: pointer;
    &.add-btn {
      color: var(--cyd-color-text-level-5);
    }
    &:hover {
      color: var(--cyd-color-text-level-2);
    }
  }
}